package com.example.ivideo_2201.test;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.Nullable;

import com.umeng.analytics.MobclickAgent;

/**
 * @author yaotianxue
 * @description
 * @date 2024/10/22
 */
public class MyView extends View {
    public MyView(Context context) {
        super(context);
    }

    public MyView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public MyView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public MyView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }
    //自定义view
    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        MobclickAgent.onPageStart("MyView");
    }

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        MobclickAgent.onPageEnd("MyView");
    }
}
